<?php
namespace app\user\validate;
use think\Validate;

class User extends Validate
{
    protected $rule = [
        'name' => 'require',
        'mobile' => 'require|mobile|unique:user',
    ];

    protected $message = [
        'name.require' => '部门名称不能为空',
        'mobile.require' => '手机号码不能为空',
        'mobile.mobile' => '手机号码格式错误',
        'mobile.unique' => '手机号码已存在',
    ];
}
